06. Environment Setup

Environment Setup (~30 minutes)

Before you can program flight plans for the simulator, there's a bit of setup that's required first.

You are welcome to skip this section if you are taking the free preview and do not want to command the drone with Python code or complete the Backyard Flyer project.

Setup Instructions (abbreviated)

Read through the instructions below. If these commands look familiar to you, then you should use these VERY abbreviated instructions to get yourself set up.

  1. download miniconda and then install by opening the file/app that you download.

  2. git clone https://github.com/udacity/FCND-Term1-Starter-Kit.git to clone the starter kit and then cd FCND-Term1-Starter-Kit into that directory. If you have a windows machine, you must rename meta_windows_patch.yml to meta.yml as well.

  3. conda env create -f environment.yml to create the miniconda environment: this took me 20 minutes to run due to the large number of installs required.

  4. source activate fcnd to activate the environment (you'll need to do this whenever you want to work in this environment).

Setup Instructions (detailed)

0. Install git (if you don't already have it)

You likely already have git available as a command line application, but if you don't you should follow the git setup instructions that are appropriate for your machine.

1. Download and Install Miniconda

We will be using Miniconda to install Python. This will help ensure that the version of Python (and all the required libraries) that you work with are exactly what they're supposed to be. This should help avoid dependency problems.

  1. Go to the miniconda distribution page and download the version of Miniconda that is right for your computer.
  2. Once the download is complete, double-click the app/file to install. If this doesn't work, you can use the terminal to execute the miniconda shell script. cd into the directory with the downloaded script and then run the following:
bash <FILENAME>

for me (on a mac), that was:

bash Miniconda3-latest-MacOSX-x86_64.sh

If you are prompted with a question like "Do you wish the installer to prepend the Miniconda3 install location to PATH…" you should say yes.

Make sure you download Miniconda for **Python 3.6**

Make sure you download Miniconda for Python 3.6

2. Get the Flying Car "Starter Kit"

We're providing you with a "starter kit" that contains the required dependencies you'll need to get up and running.

Open a terminal window and run the following commands:

git clone https://github.com/udacity/FCND-Term1-Starter-Kit.git
cd FCND-Term1-Starter-Kit

If you have a windows machine you must rename meta_windows_patch.yml to meta.yml as well.

3. Create the Environment (~20-30 mins of download required)

From the FCND-Term1-Starter-Kit, run the following command:

conda env create -f environment.yml

Running this command will create a new conda environment that is provisioned with all libraries you need to be successful in this program.

This step downloads and installs all the required libraries. It may take a while! It took 20 mins on my machine (with a fast internet connection).

NOTE: If the above command fails due to internet issues or timed out HTTP request then remove the partially built environment using the following command (then run the above create command again):

conda env remove -n fcnd

Verify that the FCND (listed fcnd) environment was created in your environments:

conda info --envs

Cleanup downloaded libraries (remove tarballs, zip files, etc):

conda clean -tp

4. Activate the Conda Environment

Now that you have created an environment, in order to use it, you will need to activate it.

This must be done each time you begin a new working session i.e. open a new terminal window.

For OS X and Linux:

$ source activate fcnd

For Windows depending on shell either:

$ source activate fcnd

or

$ activate fcnd

That's it. Now all of the fcnd libraries are available to you.